package com.example.a28796.beautiful.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by 28796 on 2016/8/29.
 */
public class FirstPageBean {

    /**
     * code : 0
     * message : null
     * obj : {"carousels":[{"liId":603030,"cover":{"url":"http://fq1.img.meidaila.net/160828/Fu52Qq09iOenzqfpYl1fMRGzb0MM.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3662198}},{"liId":573776,"cover":{"url":"http://fq1.img.meidaila.net/160811/FsxCn8CLto78zakmTpNygx_tMTvS.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3463231}},{"liId":574816,"cover":{"url":"http://fq1.img.meidaila.net/160811/Fl13jzLuacV0ylpE93SQhhFLGjJB.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3462285}},{"liId":573055,"cover":{"url":"http://fq1.img.meidaila.net/160805/FtVrvqo75oiKCU270-mNC6RehfI1.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3397322}},{"liId":513841,"cover":{"url":"http://fq1.img.meidaila.net/160615/FqWRUdeC-SyAYANsQUMz_M9LJ5Ic.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/activity/hongbao/HZCgNl9h?mdlSource=107187"}],"areas":[{"areaId":6,"defAreaName":"美购精选","areaName":"美购精选","listItems":[{"liId":603009,"title":"重磅推荐 水光美肤系列","summary":"备受明星名媛追捧的日常护肤神器，一站式全效护理，女神美肌由此绽放~","cover":{"url":"http://fq1.img.meidaila.net/160826/FjDVxji4jN516BwsGB7bJLZ4AAW3.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1013003"},{"liId":610001,"title":"综合美鼻名医 巫文云","summary":"一身过硬本领，人称美鼻圣手的巫医生，有技术，有坚持，要你美出新高度！快来看看他的\u201c必杀技\u201d吧~","cover":{"url":"http://fq1.img.meidaila.net/160829/FjZ-SBURz3-H-HCpi9EFBQ15LOOZ.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1010117"},{"liId":584052,"title":"拯救激素脸 大咖支招","summary":"一不注意被\u201c激素脸\u201d找上你，不要惊慌失措~知己知彼才能百战百胜哦，快看医美大咖专业支招","cover":{"url":"http://fq1.img.meidaila.net/160817/FmAElt54VquMA6pgYFIYRH_Gpwkt.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1006587"},{"liId":582121,"title":"项目推荐-黄金微针","summary":"五大功效，真人案例，小编用心推荐！","cover":{"url":"http://fq1.img.meidaila.net/160815/FslXBtciqbfX2eggjidLpOIAi0mP.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1005572"},{"liId":588030,"title":"为美丽而生的星级","summary":"北京地区星级医院","cover":{"url":"http://fq1.img.meidaila.net/160819/FvokT4fOC3gcQJ-cUH89OAf8bMON.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1011015"}]},{"areaId":4,"defAreaName":"医美专栏","areaName":"医美专栏","listItems":[{"liId":601015,"title":"萝卜腿不用愁！就让保妥适瘦腿针来拯救","summary":"作为小粗腿星人，这个夏天都没怎么敢露腿，桑感！听说瘦腿针可以拯救萝卜腿，本宝宝尝试了果然有效。","cover":{"url":"http://fq1.img.meidaila.net/160828/Ftx1cYMg3YUAgXSpTQx9zeJEA6LK.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3641833}},{"liId":603025,"title":"热立塑不仅能让你瘦 大腿橘皮都不见啦","summary":"S号的热裤终于可以穿进去了！新一代热力塑将能量分散在探头四个点，兼顾效果及舒适度，轻松瘦身~","cover":{"url":"http://fq1.img.meidaila.net/160828/FrXeDeEKgu0Hhw2bfIRaulFH9sm_.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3614486}},{"liId":603021,"title":"鼻翼宽缩小就行 鼻头大必须做鼻综合","summary":"鼻梁塌就垫假体注射玻尿酸？鼻头大鼻翼宽就缩小？来听听上海美仑医疗美容门诊部副主任医师崔剑怎么说。","cover":{"url":"http://fq1.img.meidaila.net/160827/Fsd8DhKfpKDSrb7S3iuH6coWtyj4.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3615963}},{"liId":603004,"title":"韩星鼻子一捏就塌整坏了?其实是鼻翼软","summary":"韩国女星鼻子捏一下就塌了，到底是怎么回事？真的是鼻整形导致的吗？还是只是一种正常的生理结构？","cover":{"url":"http://fq1.img.meidaila.net/160825/FrbOVbRw1tBGEjRhOANoicv4q1n2.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3626914}},{"liId":589069,"title":"郑爽胡彦斌复合了？颜值爱情都回来了?","summary":"今天自带热搜体质的郑爽又一次上了热搜。竟然和胡彦斌复合了？!可是现在郑爽这么美，和胡彦斌完全不搭......","cover":{"url":"http://fq1.img.meidaila.net/160825/Frdwh4rPKobkFwi3rZi8sV7TnTD3.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":1,"articleGroup":{"gid":3601362}}]}]}
     * now : 1472486223
     * sign : null
     */

    private int code;
    private Object message;
    private ObjBean obj;
    private int now;
    private Object sign;

    public static FirstPageBean objectFromData(String str) {

        return new Gson().fromJson(str, FirstPageBean.class);
    }

    public static FirstPageBean objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), FirstPageBean.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static List<FirstPageBean> arrayFirstPageBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<FirstPageBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public static List<FirstPageBean> arrayFirstPageBeanFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);
            Type listType = new TypeToken<ArrayList<FirstPageBean>>() {
            }.getType();

            return new Gson().fromJson(jsonObject.getString(str), listType);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return new ArrayList();


    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getMessage() {
        return message;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public ObjBean getObj() {
        return obj;
    }

    public void setObj(ObjBean obj) {
        this.obj = obj;
    }

    public int getNow() {
        return now;
    }

    public void setNow(int now) {
        this.now = now;
    }

    public Object getSign() {
        return sign;
    }

    public void setSign(Object sign) {
        this.sign = sign;
    }

    public static class ObjBean {
        /**
         * liId : 603030
         * cover : {"url":"http://fq1.img.meidaila.net/160828/Fu52Qq09iOenzqfpYl1fMRGzb0MM.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null}
         * type : 1
         * articleGroup : {"gid":3662198}
         */

        private List<CarouselsBean> carousels;
        /**
         * areaId : 6
         * defAreaName : 美购精选
         * areaName : 美购精选
         * listItems : [{"liId":603009,"title":"重磅推荐 水光美肤系列","summary":"备受明星名媛追捧的日常护肤神器，一站式全效护理，女神美肌由此绽放~","cover":{"url":"http://fq1.img.meidaila.net/160826/FjDVxji4jN516BwsGB7bJLZ4AAW3.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1013003"},{"liId":610001,"title":"综合美鼻名医 巫文云","summary":"一身过硬本领，人称美鼻圣手的巫医生，有技术，有坚持，要你美出新高度！快来看看他的\u201c必杀技\u201d吧~","cover":{"url":"http://fq1.img.meidaila.net/160829/FjZ-SBURz3-H-HCpi9EFBQ15LOOZ.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1010117"},{"liId":584052,"title":"拯救激素脸 大咖支招","summary":"一不注意被\u201c激素脸\u201d找上你，不要惊慌失措~知己知彼才能百战百胜哦，快看医美大咖专业支招","cover":{"url":"http://fq1.img.meidaila.net/160817/FmAElt54VquMA6pgYFIYRH_Gpwkt.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1006587"},{"liId":582121,"title":"项目推荐-黄金微针","summary":"五大功效，真人案例，小编用心推荐！","cover":{"url":"http://fq1.img.meidaila.net/160815/FslXBtciqbfX2eggjidLpOIAi0mP.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1005572"},{"liId":588030,"title":"为美丽而生的星级","summary":"北京地区星级医院","cover":{"url":"http://fq1.img.meidaila.net/160819/FvokT4fOC3gcQJ-cUH89OAf8bMON.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null},"type":2,"url":"http://m.mdl.com/special/theme/1011015"}]
         */

        private List<AreasBean> areas;

        public static ObjBean objectFromData(String str) {

            return new Gson().fromJson(str, ObjBean.class);
        }

        public static ObjBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ObjBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<ObjBean> arrayObjBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<ObjBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<ObjBean> arrayObjBeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<ObjBean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public List<CarouselsBean> getCarousels() {
            return carousels;
        }

        public void setCarousels(List<CarouselsBean> carousels) {
            this.carousels = carousels;
        }

        public List<AreasBean> getAreas() {
            return areas;
        }

        public void setAreas(List<AreasBean> areas) {
            this.areas = areas;
        }

        public static class CarouselsBean {
            private int liId;
            /**
             * url : http://fq1.img.meidaila.net/160828/Fu52Qq09iOenzqfpYl1fMRGzb0MM.jpg
             * w : 800
             * h : 402
             * status : 0
             * desc : null
             * extra : null
             */

            private CoverBean cover;
            private int type;
            /**
             * gid : 3662198
             */

            private ArticleGroupBean articleGroup;

            public static CarouselsBean objectFromData(String str) {

                return new Gson().fromJson(str, CarouselsBean.class);
            }

            public static CarouselsBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), CarouselsBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<CarouselsBean> arrayCarouselsBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<CarouselsBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<CarouselsBean> arrayCarouselsBeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<CarouselsBean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public int getLiId() {
                return liId;
            }

            public void setLiId(int liId) {
                this.liId = liId;
            }

            public CoverBean getCover() {
                return cover;
            }

            public void setCover(CoverBean cover) {
                this.cover = cover;
            }

            public int getType() {
                return type;
            }

            public void setType(int type) {
                this.type = type;
            }

            public ArticleGroupBean getArticleGroup() {
                return articleGroup;
            }

            public void setArticleGroup(ArticleGroupBean articleGroup) {
                this.articleGroup = articleGroup;
            }

            public static class CoverBean {
                private String url;
                private int w;
                private int h;
                private int status;
                private Object desc;
                private Object extra;

                public static CoverBean objectFromData(String str) {

                    return new Gson().fromJson(str, CoverBean.class);
                }

                public static CoverBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), CoverBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<CoverBean> arrayCoverBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<CoverBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<CoverBean> arrayCoverBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<CoverBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public String getUrl() {
                    return url;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public int getW() {
                    return w;
                }

                public void setW(int w) {
                    this.w = w;
                }

                public int getH() {
                    return h;
                }

                public void setH(int h) {
                    this.h = h;
                }

                public int getStatus() {
                    return status;
                }

                public void setStatus(int status) {
                    this.status = status;
                }

                public Object getDesc() {
                    return desc;
                }

                public void setDesc(Object desc) {
                    this.desc = desc;
                }

                public Object getExtra() {
                    return extra;
                }

                public void setExtra(Object extra) {
                    this.extra = extra;
                }
            }

            public static class ArticleGroupBean {
                private int gid;

                public static ArticleGroupBean objectFromData(String str) {

                    return new Gson().fromJson(str, ArticleGroupBean.class);
                }

                public static ArticleGroupBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), ArticleGroupBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<ArticleGroupBean> arrayArticleGroupBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<ArticleGroupBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<ArticleGroupBean> arrayArticleGroupBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<ArticleGroupBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public int getGid() {
                    return gid;
                }

                public void setGid(int gid) {
                    this.gid = gid;
                }
            }
        }

        public static class AreasBean {
            private int areaId;
            private String defAreaName;
            private String areaName;
            /**
             * liId : 603009
             * title : 重磅推荐 水光美肤系列
             * summary : 备受明星名媛追捧的日常护肤神器，一站式全效护理，女神美肌由此绽放~
             * cover : {"url":"http://fq1.img.meidaila.net/160826/FjDVxji4jN516BwsGB7bJLZ4AAW3.jpg","w":800,"h":402,"status":0,"desc":null,"extra":null}
             * type : 2
             * url : http://m.mdl.com/special/theme/1013003
             */

            private List<ListItemsBean> listItems;

            public static AreasBean objectFromData(String str) {

                return new Gson().fromJson(str, AreasBean.class);
            }

            public static AreasBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), AreasBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<AreasBean> arrayAreasBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<AreasBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<AreasBean> arrayAreasBeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<AreasBean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public int getAreaId() {
                return areaId;
            }

            public void setAreaId(int areaId) {
                this.areaId = areaId;
            }

            public String getDefAreaName() {
                return defAreaName;
            }

            public void setDefAreaName(String defAreaName) {
                this.defAreaName = defAreaName;
            }

            public String getAreaName() {
                return areaName;
            }

            public void setAreaName(String areaName) {
                this.areaName = areaName;
            }

            public List<ListItemsBean> getListItems() {
                return listItems;
            }

            public void setListItems(List<ListItemsBean> listItems) {
                this.listItems = listItems;
            }

            public static class ListItemsBean {
                private int liId;
                private String title;
                private String summary;
                /**
                 * url : http://fq1.img.meidaila.net/160826/FjDVxji4jN516BwsGB7bJLZ4AAW3.jpg
                 * w : 800
                 * h : 402
                 * status : 0
                 * desc : null
                 * extra : null
                 */

                private CoverBean cover;
                private int type;
                private String url;

                public static ListItemsBean objectFromData(String str) {

                    return new Gson().fromJson(str, ListItemsBean.class);
                }

                public static ListItemsBean objectFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);

                        return new Gson().fromJson(jsonObject.getString(str), ListItemsBean.class);
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return null;
                }

                public static List<ListItemsBean> arrayListItemsBeanFromData(String str) {

                    Type listType = new TypeToken<ArrayList<ListItemsBean>>() {
                    }.getType();

                    return new Gson().fromJson(str, listType);
                }

                public static List<ListItemsBean> arrayListItemsBeanFromData(String str, String key) {

                    try {
                        JSONObject jsonObject = new JSONObject(str);
                        Type listType = new TypeToken<ArrayList<ListItemsBean>>() {
                        }.getType();

                        return new Gson().fromJson(jsonObject.getString(str), listType);

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                    return new ArrayList();


                }

                public int getLiId() {
                    return liId;
                }

                public void setLiId(int liId) {
                    this.liId = liId;
                }

                public String getTitle() {
                    return title;
                }

                public void setTitle(String title) {
                    this.title = title;
                }

                public String getSummary() {
                    return summary;
                }

                public void setSummary(String summary) {
                    this.summary = summary;
                }

                public CoverBean getCover() {
                    return cover;
                }

                public void setCover(CoverBean cover) {
                    this.cover = cover;
                }

                public int getType() {
                    return type;
                }

                public void setType(int type) {
                    this.type = type;
                }

                public String getUrl() {
                    return url;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public static class CoverBean {
                    private String url;
                    private int w;
                    private int h;
                    private int status;
                    private Object desc;
                    private Object extra;

                    public static CoverBean objectFromData(String str) {

                        return new Gson().fromJson(str, CoverBean.class);
                    }

                    public static CoverBean objectFromData(String str, String key) {

                        try {
                            JSONObject jsonObject = new JSONObject(str);

                            return new Gson().fromJson(jsonObject.getString(str), CoverBean.class);
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }

                        return null;
                    }

                    public static List<CoverBean> arrayCoverBeanFromData(String str) {

                        Type listType = new TypeToken<ArrayList<CoverBean>>() {
                        }.getType();

                        return new Gson().fromJson(str, listType);
                    }

                    public static List<CoverBean> arrayCoverBeanFromData(String str, String key) {

                        try {
                            JSONObject jsonObject = new JSONObject(str);
                            Type listType = new TypeToken<ArrayList<CoverBean>>() {
                            }.getType();

                            return new Gson().fromJson(jsonObject.getString(str), listType);

                        } catch (JSONException e) {
                            e.printStackTrace();
                        }

                        return new ArrayList();


                    }

                    public String getUrl() {
                        return url;
                    }

                    public void setUrl(String url) {
                        this.url = url;
                    }

                    public int getW() {
                        return w;
                    }

                    public void setW(int w) {
                        this.w = w;
                    }

                    public int getH() {
                        return h;
                    }

                    public void setH(int h) {
                        this.h = h;
                    }

                    public int getStatus() {
                        return status;
                    }

                    public void setStatus(int status) {
                        this.status = status;
                    }

                    public Object getDesc() {
                        return desc;
                    }

                    public void setDesc(Object desc) {
                        this.desc = desc;
                    }

                    public Object getExtra() {
                        return extra;
                    }

                    public void setExtra(Object extra) {
                        this.extra = extra;
                    }
                }
            }
        }
    }
}
